import request from '@/utils/request'

// 查询商品折扣列表
export function listSpuDiscount(query) {
  return request({
    url: '/marketing/spuDiscount/list',
    method: 'get',
    params: query
  })
}

// 查询商品折扣详细
export function getSpuDiscount(id) {
  return request({
    url: '/marketing/spuDiscount/' + id,
    method: 'get'
  })
}

// 新增商品折扣
export function addSpuDiscount(data) {
  return request({
    url: '/marketing/spuDiscount',
    method: 'post',
    data: data
  })
}

// 修改商品折扣
export function updateSpuDiscount(data) {
  return request({
    url: '/marketing/spuDiscount',
    method: 'put',
    data: data
  })
}

// 删除商品折扣
export function delSpuDiscount(id) {
  return request({
    url: '/marketing/spuDiscount/' + id,
    method: 'delete'
  })
}
